import config from "@/config"
import http from "@/utils/request"

export default {
    tree: {
        url: `${config.API_URL}/system/dict/tree`,
        name: "获取字典树",
        get: async function(){
            return await http.get(this.url);
        }
    },
    save: {
        url: `${config.API_URL}/system/dict/save`,
        name: "保存字典",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    deletes: {
        url: `${config.API_URL}/system/dict/deletes`,
        name: "批量删除字典",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    saveDetail: {
        url: `${config.API_URL}/system/dict/saveDetail`,
        name: "保存字典明细",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    detailPage: {
        url: `${config.API_URL}/system/dict/detailPage`,
        name: "字典明细分页查询",
        get: async function(params){
            return await http.get(this.url, params);
        }
    },
    detailDeletes: {
        url: `${config.API_URL}/system/dict/detailDeletes`,
        name: "批量删除字典明细",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    }
}